/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Bind;

import java.util.ArrayList;
import java.util.Iterator;
import javax.swing.JComboBox;

/**
 *
 * @author Caio Valentim
 */
public class MetodoCombo {
    static JComboBox<Object> combo;
    
    public MetodoCombo(JComboBox<Object> combo){
      this.combo=combo;
    }
    
    
    public static Object getCombo(){
        return combo.getSelectedItem();   
    }
    public static void setCombo(ArrayList<Object> obj){
        for (Iterator<Object> it = obj.iterator(); it.hasNext();) {
            Object object = it.next();
            combo.addItem(object);
        }
    }
    
}
